package com.tengju.bff.interfaces.covercharge.constant;

/**
 * 自认证提现状态
 *
 * @author fwy
 */
public enum SelfWithdrawStatusEnum {

    APPLY(0, "申请中"),
    FPASS(1, "初审通过"),
    FREJECT(2, "初审拒绝"),
    SUCCESS(3, "发放成功"),
    FAIL(4, "发放失败"),
    CANCEL(5, "已取消"),
    SREJECT(6, "复核拒绝"),
    SEND(7, "发票已寄出(用户)"),
    SPASS(8, "复核通过"),//在提现上是待发放
    IN_DISTRIBUT(9, "发放中");

    private Integer code;
    private String desc;

    SelfWithdrawStatusEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public Integer getCode() {
        return this.code;
    }

    public String getDesc() {
        return this.desc;
    }

    public static SelfWithdrawStatusEnum getStatusDesc (Integer code){
        for(SelfWithdrawStatusEnum orderStatusEnum : (SelfWithdrawStatusEnum.values())){
            if(orderStatusEnum.getCode().equals(code)){//如果传入的code与此枚举code相同，则返回此枚举
                return orderStatusEnum;
            }
        }
        return null;
    }

}
